package com.goods.business.converter;

import com.goods.common.model.business.ProductCategoryTreeNode;
import com.goods.common.vo.business.ProductCategoryTreeNodeVO;
import org.springframework.beans.BeanUtils;

/**
 * @Author: 赵勇镔
 * @Time: 2021/6/7 23:59
 * @Description: vo互相转化
 */
public class ProductCategoryConverter {

    /**
     * 转vo
     * @return
     */
    public static ProductCategoryTreeNodeVO converterProductCategoryTreeNodeVO (ProductCategoryTreeNode productCategoryTreeNode){
        ProductCategoryTreeNodeVO productCategoryTreeNodeVO = new ProductCategoryTreeNodeVO();
        BeanUtils.copyProperties(productCategoryTreeNode,productCategoryTreeNodeVO);
        return productCategoryTreeNodeVO;
    }

    public static ProductCategoryTreeNode converterProductCategoryTreeNode (ProductCategoryTreeNodeVO productCategoryTreeNodeVO){
        ProductCategoryTreeNode productCategoryTreeNode = new ProductCategoryTreeNode();
        BeanUtils.copyProperties(productCategoryTreeNodeVO,productCategoryTreeNode);
        return productCategoryTreeNode;
    }


}
